package com.eqdd.yiqidian.ui.companyspace

import com.eqdd.nextinputs.StaticScheme
import com.eqdd.yiqidian.bean.rebuild.slimedit.SlimEditEnterBean
import com.eqdd.yiqidian.http.HttpConfig
import com.eqdd.yiqidian.kotlin.BaseAddActivity
import com.lzy.okgo.model.HttpParams

/**
 * Created by jhj on 18-6-23.
 */
class ContactWayAddActivity : BaseAddActivity() {


    override val url: String
        get() = HttpConfig.BASE_URL + HttpConfig.COMPANY_CONTACT_ADD
    override val title: String
        get() = "联系我们"


    override fun uploadParams(): HttpParams {
        val bean = slimAdapterEx.data
        val params = HttpParams()
        params.put("Contacts", bean[0].content)
        params.put("ContactsNumber", bean[1].content)
        params.put("SeatMachine", bean[2].content)
        params.put("Fax", "")
        params.put("Email", bean[3].content)
        params.put("Address", bean[4].content)
        return params
    }


    override fun itemClick(p: Int) {


    }

    override fun setEditBeans() {
        datas.add(SlimEditEnterBean("联 系 人", "", 0, "请输入").setNeed(true))
        datas.add(SlimEditEnterBean("联系方式", "", 1, "请输入").setSchemes(arrayListOf(StaticScheme.ChineseMobile())).setNeed(true))
        datas.add(SlimEditEnterBean("座       机", "", 2, "请输入").setSchemes(arrayListOf(StaticScheme.ChineseTelephone())).setNeed(true))
        datas.add(SlimEditEnterBean("邮       箱", "", 3, "请输入").setSchemes(arrayListOf(StaticScheme.Email())).setNeed(true))
        datas.add(SlimEditEnterBean("地       址", "", 4, "请输入").setNeed(true))
    }

}